<template>
  <el-dialog
    :modal="false"
    :close-on-click-modal="false"
    width="70%"
    :visible.sync="visible"
  >
  <el-button type="primary"  v-print ="'#lxfPdf4'">打印</el-button>
    <div ref="lxfPdf4" id="lxfPdf4">
    <div class="title">军队无军籍离休干部离休费构成表</div>
    <div class="title1">（1993年10月至2003年6月离休人员）</div>
    <div style="width:100%;height:20px">
    <div style="display: inline-block;margin-left:2%">工作单位：盖章</div>
    <div style="display: inline-block;margin-left:62%;">编码：{{dataForm.personalCode}}</div>
    </div>
    <!-- <div class="cont"> -->
      <!-- 第一行表格 五列 -->
      <div class="table">
          <div class="box">
            <div class="content1">姓名</div>
            <div class="content_border">{{dataForm.name}}</div>
            <div class="content1">性别</div>
            <div class="content_border">{{dataForm.sex}}</div>
            <div class="content1">出生年月</div>
            <div class="content_border">{{dataForm.birthDate}}</div>
            <div class="content1">参加工作时间</div>
            <div class="content_border">{{dataForm.workTime}}</div>
            <div class="content1">离休时间</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">{{dataForm.retirementTime}}</div>
          </div>
      </div>
      <!-- 第二行表格 三列 2-4 -->
      <div class="table">
          <div class="box">
            <div class="content1">职务</div>
            <div class="content_border">{{dataForm.duties}}</div>
            <div class="content1">工资等级</div>
            <div class="content_border" style="width:160%">{{dataForm.wageScale}}</div>
            <div class="content1">原部队</div>
            <div class="content_border">{{dataForm.originalTroops}}</div>
            <div class="content1" >移交时间</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">{{dataForm.handoverTime}}</div>
        </div>
      </div>
      <div class="table">
          <div class="box">
            <div class="content1">工作年限</div>
            <div class="content_border">{{dataForm.workingYears}}</div>
            <div class="content1">军队工作年限</div>
            <div class="content_border">{{dataForm.workingYearsArmy}}</div>
            <div class="content1" style="width:100%">教（护）龄</div>
            <div class="content_border" style="width:40%">{{dataForm.teachingAge}}</div>
            <div class="content1" style="width:100%">离休费计发比例</div>
            <div class="content_border" style="border-right: 1px solid #e9e9e9;">{{dataForm.retirementFeeProportion}}</div>
        </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">退休费基数</div> 
          </div>
          <div class="box">
            <div class="content1" style="width:100%">提高工资10%</div>
            <div class="content_border" style="width:100%">{{dataForm.raiseWages}}</div>
            <div class="content1" style="width:100%">奖金津贴</div>
            <div class="content_border" style="width:100%;" >{{dataForm.bonusAllowance}}</div> 
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;">标准工资</div>
            <div class="content_border" style="width:100%;" >{{dataForm.gradeSalary}}</div> 
          </div>
          <div class="box">
            <div class="content1" style="width:100%">特教技师补贴</div>
            <div class="content_border" style="width:100%;">{{dataForm.specialTeacherSubsidy}}</div>
            <div class="content1" style="width:100%">教龄津贴</div>
            <div class="content_border" style="width:100%;" >{{dataForm.seniorityAllowance}}</div> 
            <div class="content1" style="width:100%">军队服务津贴</div>
            <div class="content_border" style="width:100%;border-right: 1px solid #e9e9e9;">{{dataForm.serviceAllowance}}</div>
          </div>
          <div class="box">  
            <div class="content1" style="width:400%;text-align: right;">基本离休费合计：</div>
            <div class="content_border" style="width:200%;border-right: 1px solid #e9e9e9;">{{this.resultA}}</div> 
          </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">历次增加的退休费</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%">1999年10月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayNinetynisec}}</div>
            <div class="content1" style="width:140%;">2001年1月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayOne}}</div>
            <div class="content1" style="width:140%">2001年10月新增离休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.retirementPayOnenew}}</div> 
          </div>
          <div class="box" >
             <div class="content1" style="width:140%">1997年7月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayNinetyseven}}</div>
            <div class="content1" style="width:140%">2001年10月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayOnsec}}</div>
            <div class="content1" style="width:140%">1995年10月增加离休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.retirementPayNinetyfive}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">2003年7月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayThird}}</div>
            <div class="content1" style="width:140%">2005年10月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayFive}}</div>
            <div class="content1" style="width:140%">2003年10月增加离休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.retirementPayThisec}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">1997年10月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayNinetysesec}}</div>
            <div class="content1" style="width:140%;">2006年7月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPaySix}}</div>
            <div class="content1" style="width:140%">1999年7月增加离休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.retirementPayNinetynine}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%">2014年10月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayFourty}}</div>
            <div class="content1" style="width:140%">2016年7月增加离休费</div>
            <div class="content_border" style="width:60%" >{{dataForm.retirementPaySixteen}}</div> 
            <div class="content1" style="width:140%;">2018年7月增加离休费</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;">{{dataForm.retirementPayEighteen}}</div>
          </div>
          <div class="box" >
            <div class="content1" style="width:340%">2021年10月增加离休费</div>
            <div class="content_border" style="width:60%">{{dataForm.retirementPayTwentyten}}</div>
            <div class="content1" style="width:140%">历次增加离休费合计：</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{this.resultB}}</div> 
          </div>
      </div>
      
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">津贴补贴</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">离休补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.lxbthj}}</div>
            <div class="content1" style="width:140%">养老医疗补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.pensionMedicalSubsidy}}</div>
            <div class="content1" style="width:140%">荣誉津贴</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.honorAllowance}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">护理费</div>
            <div class="content_border" style="width:60%">{{dataForm.nursingFee}}</div>
            <div class="content1" style="width:140%">政府特殊津贴</div>
            <div class="content_border" style="width:60%">{{dataForm.specialGoveAllowanc}}</div>
            <div class="content1" style="width:140%">用车包干补贴</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{dataForm.carAllowance}}</div> 
          </div>
          <div class="box" >
            <div class="content1" style="width:140%;">物业服务补贴</div>
            <div class="content_border" style="width:60%">{{dataForm.serviceSubsidy}}</div>
            <div class="content1" style="width:140%">津贴补贴合计：</div>
            <div class="content_border" style="width:60%">{{this.resultG}}</div>
            <div class="content1" style="width:140%">离休费合计：</div>
            <div class="content_border" style="width:60%;border-right: 1px solid #e9e9e9;" >{{this.resultH}}</div> 
          </div>
      </div>
      <div class="table">
          <div class="box" >
            <div class="content1" style="width:100%;border-right: 1px solid #e9e9e9;;font-size: 18px;font-weight: 600;">备注</div> 
          </div>
          <td style="width:100%">
          <div class="box" style="height:100px;border-right: 1px solid #e9e9e9;">
            <div class="content_border" style="height:100px;width:100%"></div>
        </div>
        </td> 
      </div><br>
      <div style="width:100%;height:20px">
      <div style="display: inline-block;margin-left:2%;font-weight: 600;">办理移交手续时本构成表内容须经离休干部本人确认无误并签字。</div>
      <div style="display: inline-block;margin-left:13%;font-weight: 600;">离休干部本人签字：</div>
      </div>
  </div>
    
  </el-dialog>
  
</template>
<script>

import html2canvas from 'html2canvas' // 转为图片
import printJS from 'print-js' // 打印
import print from 'vue-print-nb';
export default {
  data() {
    return {
      logoutDateDisabled: false,
      deathDisabled: false,
      deathTimeDisabled: false,
      postLevel: false,
      salaryClass: false,
      allowanceRatioClass: false,
      wageGradeClass: false,
      rensonClass: false,
      activeName: "first",
      visible: false,
      isTitle: "",
      isDisabled: false,
      visibleLine:"",
      isDisabled2:false,
      sfxs:"none",
     
      dataForm: {
        
        id: 0,
        areaCode: '',
        personalCode: '',
        name: '',
        sex: '',
        nation: '',
        politicalFace: '',
        idNo: '',
        birthDate: '',
        workTime: '',
        retirementTime: '',
        retirementStatus: '',
        duties: '',
        county: '',
        street: '',
        originalTroops: '',
        handoverTime: '',
        handoverMode: '',
        handoverBatch: '',
        workersClassification: '',
        myStatus: '',
        death: '',
        deathTime: '',
        reception: '',
        housingSituation: '',
        housingPropertyRight: '',
        leaseholder: '',
        housingArea: '',
        increasePension: '',
        totalMonthlyPension: '',
        address: '',
        phone: '',
        remarks: '',
        teachingAge: '',
        workingYears: '',
        workingYearsArmy: '',
        wageLevel: '',
        wageGrade: '',
        wageScale: '',
        retirementFeeProportion: '',
        senioritySalary: '',
        basicSalary: '',
        levelSalary: '',
        gradeSalary: '',
        salaryScale: '',
        bonusAllowance: '',
        serviceAllowance: '',
        seniorityAllowance: '',
        totalSubsidy: '',
        specialTeacherSubsidy: '',
        difficultySubsidy: '',
        raiseWages: '',
        retirementPayEightynine: '',
        retirementPayNinetytwo: '',
        retirementPayFirst: '',
        retirementPaySecond: '',
        retirementPayNinetyfive: '',
        retirementPayNinetyseven: '',
        retirementPayNinetysesec: '',
        retirementPayNinetynine: '',
        retirementPayNinetynisec: '',
        retirementPayZero: '',
        retirementPayOne: '',
        retirementPayOnenew: '',
        retirementPayOnsec: '',
        retirementPayThird: '',
        retirementPayThisec: '',
        retirementPayFive: '',
        retirementPaySix: '',
        retirementPayFourty: '',
        foodAllowanceSeventynine: '',
        foodAllowanceEightyeight: '',
        oilAllowanceNightyone: '',
        oilAllowanceNightytwo: '',
        fuelLlowance: '',
        meatLlowance: '',
        oilAllowanceNightythird: '',
        livingAllowanceEightyfive: '',
        livingAllowanceEightyei: '',
        livingAllowanceNightytw: '',
        livingAllowanceNightyfo: '',
        livingAllowanceNightyfive: '',
        livingAllowanceNightysix: '',
        livingAllowanceNightysev: '',
        livingAllowanceNightyeig: '',
        livingAllowanceNightynig: '',
        livingAllowanceZero: '',
        livingAllowanceOne: '',
        livingAllowanceTwo: '',
        livingAllowanceThird: '',
        livingAllowanceFour: '',
        livingAllowanceSeven: '',
        specialGoveAllowanc: '',
        paperMoney: '',
        carAllowance: '',
        bathSubsidy: '',
        honorAllowance: '',
        otherIncome: '',
        jobSubsidy: '',
        ageAllowance: '',
        holidaySubsidy: '',
        retirementAllowanceOneo: '',
        growthMechanismSubsidy: '',
        workingYearsSubsidy: '',
        proportionalSubsidy: '',
        workUnit: '',
        increaseProportion: '',
        renson: '',
        registrationNo: '',
        nativePlace: '',
        registeredResidence: '',
        zfgdTime: '',
        resettlementPlanTime: '',
        medicalInsurance: '',
        allowanceRatio: '',
        enjoyAllowance: '',
        specialAllowance: '',
        treatmentStandard: '',
        postLevel: '',
        salary: '',
        isImprove: '',
        personnelClassification: '',
        pensionMedicalSubsidy: '',
        nursingFee: '',
        isNursingFee: '',
        heatingSubsidy: '',
        serviceSubsidy: '',
        retirementPaySixteen: '',
        retirementPayEighteen: '',
        retirementPayNineteen: '',
        retirementPayTwentyseven: '',
        retirementPayTwentyten: '',
        logoutDate: '',
        personType: '',
        state: '',
        lxbthj:0
        
      },
      dataRule: {
        
      },
    };
  },
  created() {
        
  },
  computed: {
   //离休费基数信息
    resultA() {
      //不计算比例
      let basicSalary = this.dataForm.basicSalary; //基础工资
      let senioritySalary = this.dataForm.senioritySalary; //工龄工资
      let seniorityAllowance = this.dataForm.seniorityAllowance; //教护龄津贴
      let specialTeacherSubsidy = this.dataForm.specialTeacherSubsidy; //特级老师补贴
      //计算比例
      let raiseWages = this.dataForm.raiseWages; //提高工资10%
      let serviceAllowance = this.dataForm.serviceAllowance; //军队服务津贴
      let gradeSalary = this.dataForm.gradeSalary; //岗位工资(职务、级别标准工资)
      let levelSalary = this.dataForm.levelSalary; //级别工资
      let bonusAllowance = this.dataForm.bonusAllowance; //奖金津贴

     
      
      let sumBasicRe = 0;
      if (raiseWages !== "" && raiseWages !== null) {
        sumBasicRe = sumBasicRe + parseFloat(raiseWages);
      }
      if (serviceAllowance !== "" && serviceAllowance !== null) {
        sumBasicRe = sumBasicRe + parseFloat(serviceAllowance);
      }
      if (gradeSalary !== "" && gradeSalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(gradeSalary);
      }
      if (levelSalary !== "" && levelSalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(levelSalary);
      }
      if (bonusAllowance !== "" && bonusAllowance !== null) {
        sumBasicRe = sumBasicRe + parseFloat(bonusAllowance);
      }
      if (basicSalary !== "" && basicSalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(basicSalary);
      }
      if (senioritySalary !== "" && senioritySalary !== null) {
        sumBasicRe = sumBasicRe + parseFloat(senioritySalary);
      }
      if (seniorityAllowance !== "" && seniorityAllowance !== null) {
        sumBasicRe = sumBasicRe + parseFloat(seniorityAllowance);
      }
      if (specialTeacherSubsidy !== "" && specialTeacherSubsidy !== null) {
        sumBasicRe = sumBasicRe + parseFloat(specialTeacherSubsidy);
      }
      
      
      return parseFloat(sumBasicRe).toFixed(2);
    },
    //历次增加的退休费合计
    resultB() {
      let retirementPayEightynine = this.dataForm.retirementPayEightynine; //1989年10月增加退休费
      let retirementPayNinetyfive = this.dataForm.retirementPayNinetyfive; //1995年10月增加退休费
      let retirementPayNinetynisec = this.dataForm.retirementPayNinetynisec; //1999年10月增加退休费
      let retirementPayThisec = this.dataForm.retirementPayThisec; //2003年10月增加退休费
      let retirementPayFirst = this.dataForm.retirementPayFirst; //1993年10月第一步增加退休费
      let retirementPayNinetyseven = this.dataForm.retirementPayNinetyseven; //1997年7月增加退休费
      let retirementPayOne = this.dataForm.retirementPayOne; //2001年1月增加退休费
      let retirementPayThird = this.dataForm.retirementPayThird; //2003年7月增加退休费
      let retirementPayFourty = this.dataForm.retirementPayFourty; //2014年10月增加退休费
      let retirementPayNinetytwo = this.dataForm.retirementPayNinetytwo; //1992年3月提高退休费10％
      let retirementPayNinetysesec = this.dataForm.retirementPayNinetysesec; //1997年10月增加退休费
      let retirementPayOnsec = this.dataForm.retirementPayOnsec; //2001年10月增加退休费
      let retirementPayFive = this.dataForm.retirementPayFive; //2005年10月增加退休费
      let retirementPaySecond = this.dataForm.retirementPaySecond; //1993年10月第二步增加退休费
      let retirementPayNinetynine = this.dataForm.retirementPayNinetynine; //1999年7月增加退休费
      let retirementPayOnenew = this.dataForm.retirementPayOnenew; //2001年10月新增退休费
      let retirementPaySix = this.dataForm.retirementPaySix; //2006年7月增加退休费
      let retirementPaySixteen = this.dataForm.retirementPaySixteen//2016年7月增加离休费
      let retirementPayEighteen = this.dataForm.retirementPayEighteen//2018年7月增加离休费
      let retirementPayTwentyten = this.dataForm.retirementPayTwentyten//2021年10月增加离休费
      let sumAddRe = 0;
      if (retirementPayEightynine !== "" && retirementPayEightynine !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayEightynine);
      }
      if (retirementPayNinetyfive !== "" && retirementPayNinetyfive !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetyfive);
      }
      if (retirementPayNinetynisec !== "" && retirementPayNinetynisec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetynisec);
      }
      if (retirementPayThisec !== "" && retirementPayThisec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayThisec);
      }
      if (retirementPayFirst !== "" && retirementPayFirst !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayFirst);
      }
      if (retirementPayNinetyseven !== "" && retirementPayNinetyseven !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetyseven);
      }
      if (retirementPayOne !== "" && retirementPayOne !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayOne);
      }
      if (retirementPayThird !== "" && retirementPayThird !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayThird);
      }
      if (retirementPayFourty !== "" && retirementPayFourty !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayFourty);
      }
      if (retirementPayNinetytwo !== "" && retirementPayNinetytwo !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetytwo);
      }
      if (retirementPayNinetysesec !== "" && retirementPayNinetysesec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetysesec);
      }
      if (retirementPayOnsec !== "" && retirementPayOnsec !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayOnsec);
      }
      if (retirementPayFive !== "" && retirementPayFive !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayFive);
      }
      if (retirementPaySecond !== "" && retirementPaySecond !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPaySecond);
      }
      if (retirementPayNinetynine !== "" && retirementPayNinetynine !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayNinetynine);
      }
      if (retirementPayOnenew !== "" && retirementPayOnenew !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayOnenew);
      }
      if (retirementPaySix !== "" && retirementPaySix !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPaySix);
      }
      if (retirementPaySixteen !== "" && retirementPaySixteen !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPaySixteen);
      }
      if (retirementPayEighteen !== "" && retirementPayEighteen !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayEighteen);
      }
      if (retirementPayTwentyten !== "" && retirementPayTwentyten !== null) {
        sumAddRe = sumAddRe + parseFloat(retirementPayTwentyten);
      }
      return parseFloat(sumAddRe).toFixed(2);
    },
    //增长机制其它补贴合计
    resultG() {
      let pensionMedicalSubsidy = this.dataForm.pensionMedicalSubsidy//养老医疗补贴
      let nursingFee = this.dataForm.nursingFee//护理费（自雇费）
      let carAllowance = this.dataForm.carAllowance//用车包干补贴
      let growthMechanismSubsidy = this.dataForm.growthMechanismSubsidy//2012年增长机制补贴
      let retirementPayNineteen = this.dataForm.retirementPayNineteen//2019年1月增加离休补贴
      let retirementPayTwentyseven = this.dataForm.retirementPayTwentyseven//2021年7月增加离休补贴
      let honorAllowance = this.dataForm.honorAllowance; //荣誉津贴
      let serviceSubsidy = this.dataForm.serviceSubsidy; //物业服务补贴
      let sumOther = 0;
      if (pensionMedicalSubsidy !== "" && pensionMedicalSubsidy !== null) {
        sumOther = sumOther + parseFloat(pensionMedicalSubsidy);
      }
      if (nursingFee !== "" && nursingFee !== null) {
        sumOther = sumOther + parseFloat(nursingFee);
      }
      if (carAllowance !== "" && carAllowance !== null) {
        sumOther = sumOther + parseFloat(carAllowance);
      }
      if (growthMechanismSubsidy !== "" && growthMechanismSubsidy !== null) {
        sumOther = sumOther + parseFloat(growthMechanismSubsidy);
      }
      if (retirementPayNineteen !== "" && retirementPayNineteen !== null) {
        sumOther = sumOther + parseFloat(retirementPayNineteen);
      }
      if (retirementPayTwentyseven !== "" && retirementPayTwentyseven !== null) {
        sumOther = sumOther + parseFloat(retirementPayTwentyseven);
      }
      if (honorAllowance !== "" && honorAllowance !== null) {
        sumOther = sumOther + parseFloat(honorAllowance);
      }
      if (serviceSubsidy !== "" && serviceSubsidy !== null) {
        sumOther = sumOther + parseFloat(serviceSubsidy);
      }
      return parseFloat(sumOther).toFixed(2);
    },
    //自动生成退休费总额
    resultH() {
      let resultA = this.resultA;
      let resultB = this.resultB;
      let resultG = this.resultG;
      let sum = 0;
      if (resultA !== "" && resultA !== null) {
        sum = sum + parseFloat(resultA);
      }
      if (resultB !== "" && resultB !== null) {
        sum = sum + parseFloat(resultB);
      }
      if (resultG !== "" && resultG !== null) {
        sum = sum + parseFloat(resultG);
      }
      return sum;
    },
    //退休费的差额
    resultI() {
      let resultH = this.resultH;
      let totalMonthlyPension = this.dataForm.totalMonthlyPension;
      let sum = 0;
      if (resultH !== "" && resultH !== null && totalMonthlyPension !== "" && totalMonthlyPension !== null ) {
        sum = parseFloat(resultH) - parseFloat(totalMonthlyPension);
      }
      return parseFloat(sum).toFixed(2);
    },
    //年离休费总额
    resultK(){
      let totalMonthlyPension = this.dataForm.totalMonthlyPension;
      let yearSum = 0;
      yearSum = totalMonthlyPension*12
       return parseFloat(yearSum).toFixed(2);
    }
  },

  methods: {
    
    test(id) {
      this.dataForm.id = id || 0;
      this.visible = true;
      this.$http({
        url: this.$http.adornUrl(`/jxxm/honorableemployees/info/${this.dataForm.id}`),
        method: "get",
        params: this.$http.adornParams(),
      }).then(({ data }) => {
        if (data && data.code === 0) {
          this.dataForm.areaCode = data.honorableEmployees.areaCode
          this.dataForm.personalCode = data.honorableEmployees.personalCode
          this.dataForm.name = data.honorableEmployees.name
          this.dataForm.sex = data.honorableEmployees.sex
          this.dataForm.nation = data.honorableEmployees.nation
          this.dataForm.politicalFace = data.honorableEmployees.politicalFace
          this.dataForm.idNo = data.honorableEmployees.idNo
          this.dataForm.birthDate = data.honorableEmployees.birthDate
          this.dataForm.workTime = data.honorableEmployees.workTime
          this.dataForm.retirementTime = data.honorableEmployees.retirementTime
          this.dataForm.retirementStatus = data.honorableEmployees.retirementStatus
          this.dataForm.duties = data.honorableEmployees.duties
          this.dataForm.county = data.honorableEmployees.county
          this.dataForm.street = data.honorableEmployees.street
          this.dataForm.originalTroops = data.honorableEmployees.originalTroops
          this.dataForm.handoverTime = data.honorableEmployees.handoverTime
          this.dataForm.handoverMode = data.honorableEmployees.handoverMode
          this.dataForm.handoverBatch = data.honorableEmployees.handoverBatch
          this.dataForm.workersClassification = data.honorableEmployees.workersClassification
          this.dataForm.myStatus = data.honorableEmployees.myStatus
          this.dataForm.death = data.honorableEmployees.death
          this.dataForm.deathTime = data.honorableEmployees.deathTime
          this.dataForm.reception = data.honorableEmployees.reception
          this.dataForm.housingSituation = data.honorableEmployees.housingSituation
          this.dataForm.housingPropertyRight = data.honorableEmployees.housingPropertyRight
          this.dataForm.leaseholder = data.honorableEmployees.leaseholder
          this.dataForm.housingArea = data.honorableEmployees.housingArea
          this.dataForm.increasePension = data.honorableEmployees.increasePension
          this.dataForm.totalMonthlyPension = data.honorableEmployees.totalMonthlyPension
          this.dataForm.address = data.honorableEmployees.address
          this.dataForm.phone = data.honorableEmployees.phone
          this.dataForm.remarks = data.honorableEmployees.remarks
          this.dataForm.teachingAge = data.honorableEmployees.teachingAge
          this.dataForm.workingYears = data.honorableEmployees.workingYears
          this.dataForm.workingYearsArmy = data.honorableEmployees.workingYearsArmy
          this.dataForm.wageLevel = data.honorableEmployees.wageLevel
          this.dataForm.wageGrade = data.honorableEmployees.wageGrade
          this.dataForm.wageScale = data.honorableEmployees.wageScale
          this.dataForm.retirementFeeProportion = data.honorableEmployees.retirementFeeProportion
          this.dataForm.senioritySalary = data.honorableEmployees.senioritySalary
          this.dataForm.basicSalary = data.honorableEmployees.basicSalary
          this.dataForm.levelSalary = data.honorableEmployees.levelSalary
          this.dataForm.gradeSalary = data.honorableEmployees.gradeSalary
          this.dataForm.salaryScale = data.honorableEmployees.salaryScale
          this.dataForm.bonusAllowance = data.honorableEmployees.bonusAllowance
          this.dataForm.serviceAllowance = data.honorableEmployees.serviceAllowance
          this.dataForm.seniorityAllowance = data.honorableEmployees.seniorityAllowance
          this.dataForm.totalSubsidy = data.honorableEmployees.totalSubsidy
          this.dataForm.specialTeacherSubsidy = data.honorableEmployees.specialTeacherSubsidy
          this.dataForm.difficultySubsidy = data.honorableEmployees.difficultySubsidy
          this.dataForm.raiseWages = data.honorableEmployees.raiseWages
          this.dataForm.retirementPayEightynine = data.honorableEmployees.retirementPayEightynine
          this.dataForm.retirementPayNinetytwo = data.honorableEmployees.retirementPayNinetytwo
          this.dataForm.retirementPayFirst = data.honorableEmployees.retirementPayFirst
          this.dataForm.retirementPaySecond = data.honorableEmployees.retirementPaySecond
          this.dataForm.retirementPayNinetyfive = data.honorableEmployees.retirementPayNinetyfive
          this.dataForm.retirementPayNinetyseven = data.honorableEmployees.retirementPayNinetyseven
          this.dataForm.retirementPayNinetysesec = data.honorableEmployees.retirementPayNinetysesec
          this.dataForm.retirementPayNinetynine = data.honorableEmployees.retirementPayNinetynine
          this.dataForm.retirementPayNinetynisec = data.honorableEmployees.retirementPayNinetynisec
          this.dataForm.retirementPayZero = data.honorableEmployees.retirementPayZero
          this.dataForm.retirementPayOne = data.honorableEmployees.retirementPayOne
          this.dataForm.retirementPayOnenew = data.honorableEmployees.retirementPayOnenew
          this.dataForm.retirementPayOnsec = data.honorableEmployees.retirementPayOnsec
          this.dataForm.retirementPayThird = data.honorableEmployees.retirementPayThird
          this.dataForm.retirementPayThisec = data.honorableEmployees.retirementPayThisec
          this.dataForm.retirementPayFive = data.honorableEmployees.retirementPayFive
          this.dataForm.retirementPaySix = data.honorableEmployees.retirementPaySix
          this.dataForm.retirementPayFourty = data.honorableEmployees.retirementPayFourty
          this.dataForm.foodAllowanceSeventynine = data.honorableEmployees.foodAllowanceSeventynine
          this.dataForm.foodAllowanceEightyeight = data.honorableEmployees.foodAllowanceEightyeight
          this.dataForm.oilAllowanceNightyone = data.honorableEmployees.oilAllowanceNightyone
          this.dataForm.oilAllowanceNightytwo = data.honorableEmployees.oilAllowanceNightytwo
          this.dataForm.fuelLlowance = data.honorableEmployees.fuelLlowance
          this.dataForm.meatLlowance = data.honorableEmployees.meatLlowance
          this.dataForm.oilAllowanceNightythird = data.honorableEmployees.oilAllowanceNightythird
          this.dataForm.livingAllowanceEightyfive = data.honorableEmployees.livingAllowanceEightyfive
          this.dataForm.livingAllowanceEightyei = data.honorableEmployees.livingAllowanceEightyei
          this.dataForm.livingAllowanceNightytw = data.honorableEmployees.livingAllowanceNightytw
          this.dataForm.livingAllowanceNightyfo = data.honorableEmployees.livingAllowanceNightyfo
          this.dataForm.livingAllowanceNightyfive = data.honorableEmployees.livingAllowanceNightyfive
          this.dataForm.livingAllowanceNightysix = data.honorableEmployees.livingAllowanceNightysix
          this.dataForm.livingAllowanceNightysev = data.honorableEmployees.livingAllowanceNightysev
          this.dataForm.livingAllowanceNightyeig = data.honorableEmployees.livingAllowanceNightyeig
          this.dataForm.livingAllowanceNightynig = data.honorableEmployees.livingAllowanceNightynig
          this.dataForm.livingAllowanceZero = data.honorableEmployees.livingAllowanceZero
          this.dataForm.livingAllowanceOne = data.honorableEmployees.livingAllowanceOne
          this.dataForm.livingAllowanceTwo = data.honorableEmployees.livingAllowanceTwo
          this.dataForm.livingAllowanceThird = data.honorableEmployees.livingAllowanceThird
          this.dataForm.livingAllowanceFour = data.honorableEmployees.livingAllowanceFour
          this.dataForm.livingAllowanceSeven = data.honorableEmployees.livingAllowanceSeven
          this.dataForm.specialGoveAllowanc = data.honorableEmployees.specialGoveAllowanc
          this.dataForm.paperMoney = data.honorableEmployees.paperMoney
          this.dataForm.carAllowance = data.honorableEmployees.carAllowance
          this.dataForm.bathSubsidy = data.honorableEmployees.bathSubsidy
          this.dataForm.honorAllowance = data.honorableEmployees.honorAllowance
          this.dataForm.otherIncome = data.honorableEmployees.otherIncome
          this.dataForm.jobSubsidy = data.honorableEmployees.jobSubsidy
          this.dataForm.ageAllowance = data.honorableEmployees.ageAllowance
          this.dataForm.holidaySubsidy = data.honorableEmployees.holidaySubsidy
          this.dataForm.retirementAllowanceOneo = data.honorableEmployees.retirementAllowanceOneo
          this.dataForm.growthMechanismSubsidy = data.honorableEmployees.growthMechanismSubsidy
          this.dataForm.workingYearsSubsidy = data.honorableEmployees.workingYearsSubsidy
          this.dataForm.proportionalSubsidy = data.honorableEmployees.proportionalSubsidy
          this.dataForm.workUnit = data.honorableEmployees.workUnit
          this.dataForm.increaseProportion = data.honorableEmployees.increaseProportion
          this.dataForm.renson = data.honorableEmployees.renson
          this.dataForm.registrationNo = data.honorableEmployees.registrationNo
          this.dataForm.nativePlace = data.honorableEmployees.nativePlace
          this.dataForm.registeredResidence = data.honorableEmployees.registeredResidence
          this.dataForm.zfgdTime = data.honorableEmployees.zfgdTime
          this.dataForm.resettlementPlanTime = data.honorableEmployees.resettlementPlanTime
          this.dataForm.medicalInsurance = data.honorableEmployees.medicalInsurance
          this.dataForm.allowanceRatio = data.honorableEmployees.allowanceRatio
          this.dataForm.enjoyAllowance = data.honorableEmployees.enjoyAllowance
          this.dataForm.specialAllowance = data.honorableEmployees.specialAllowance
          this.dataForm.treatmentStandard = data.honorableEmployees.treatmentStandard
          this.dataForm.postLevel = data.honorableEmployees.postLevel
          this.dataForm.salary = data.honorableEmployees.salary
          this.dataForm.isImprove = data.honorableEmployees.isImprove
          this.dataForm.personnelClassification = data.honorableEmployees.personnelClassification
          this.dataForm.pensionMedicalSubsidy = data.honorableEmployees.pensionMedicalSubsidy
          this.dataForm.nursingFee = data.honorableEmployees.nursingFee
          this.dataForm.isNursingFee = data.honorableEmployees.isNursingFee
          this.dataForm.heatingSubsidy = data.honorableEmployees.heatingSubsidy
          this.dataForm.serviceSubsidy = data.honorableEmployees.serviceSubsidy
          this.dataForm.retirementPaySixteen = data.honorableEmployees.retirementPaySixteen
          this.dataForm.retirementPayEighteen = data.honorableEmployees.retirementPayEighteen
          this.dataForm.retirementPayNineteen = data.honorableEmployees.retirementPayNineteen
          this.dataForm.retirementPayTwentyseven = data.honorableEmployees.retirementPayTwentyseven
          this.dataForm.retirementPayTwentyten = data.honorableEmployees.retirementPayTwentyten
          this.dataForm.logoutDate = data.honorableEmployees.logoutDate
          this.dataForm.personType = data.honorableEmployees.personType
          this.dataForm.state = data.honorableEmployees.state 

          
          var A = this.dataForm.growthMechanismSubsidy;
          var B = this.dataForm.retirementPayNineteen;
          var C = this.dataForm.retirementPayTwentyseven;
          this.dataForm.lxbthj = parseFloat(A)+parseFloat(B)+parseFloat(C)
        }
      });
    },
    printHandle() {
      html2canvas(this.$refs.exportPdf, {
        backgroundColor: null,
        useCORS: true,
        windowHeight: document.body.scrollHeight
      }).then(canvas => {
        const url = canvas.toDataURL()
        this.img = url
        printJS({
          printable: url,
          type: 'image',
          documentTitle: ''
        })
      })
    },
    
  },
};
</script>

<style scoped lang="scss">
$titleColor: rgb(117, 117, 117);
$borderColor: 1px solid #e9e9e9;
.title {
  width: 100%; // 1200px
  margin: 0 auto;
  margin-top: 1px;
  padding: 1px 0;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  //background-color: #e1e1e1;
  // border: 1px solid #e1e1e1;
}
.title1 {
  width: 100%; // 1200px
  margin-left:10px;
  margin-top: 5px;
  padding: 1px 0;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  //background-color: #e1e1e1;
  // border: 1px solid #e1e1e1;
}
.title2 {
  width: 50%; // 1200px
  margin-left:1200px;
  margin-top: 5px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  // text-align: center;
  //background-color: #e1e1e1;
  // border: 1px solid #e1e1e1;
}
.cont {
  border-right: $borderColor;
}
.table {
  width: 100%; // 1200px
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.lump {
  width: 20%;
}
.lump2 {
  width: 40%;
}
.lump2:nth-child(3),
.lump2:nth-child(6),
.lump2:last-child {
  width: 20%;
}
.box {
  width: 100%;
  height: 38px;
  display: flex;
  border-top: $borderColor;
  .content1 {
    width: 40%;
    height: 38px;
    line-height: 38px;
    text-align: center;
    background-color: #fafafa;
    border-left: $borderColor;
    border-bottom: $borderColor;
    color: $titleColor;
    font-size: 14px;
  }
  .content2 {
    width: 60%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #fff;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: 000;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden; //超出的文本隐藏
    text-overflow: ellipsis; //溢出用省略号显示
    white-space: nowrap; //溢出不换行
  }
  .content4 {
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #fafafa;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: $titleColor;
    font-size: 14px;
  }
  // .content2:last-child {
  //   border-right: $borderColor;
  // }
  .content_border {
    width: 60%;
    height: 38px;
    line-height: 38px;
    text-align: center;
    background-color: #fff;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: 000;
    font-size: 14px;
    cursor: pointer;
    // overflow: hidden; //超出的文本隐藏
    //text-overflow: ellipsis; //溢出用省略号显示
    //white-space: nowrap; //溢出不换行
  }
  .content_border1 {
    width: 100%;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #fff;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: 000;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden; //超出的文本隐藏
    text-overflow: ellipsis; //溢出用省略号显示
    white-space: nowrap; //溢出不换行
  }
}
// 三列样式
.content3 {
  width: 100%;
  height: 40px;
  display: inline-block;
  line-height: 40px;
  text-align: center;
  background-color: #fff;
  border: $borderColor;
  border-right: none;
  color: 000;
  font-size: 14px;
  font-weight: 600;
}
// 四列样式
.lump4 {
  width: 100%;
  display: flex;
  // align-items: center;
  flex-wrap: wrap;
  box-sizing: border-box;
  border: $borderColor;
  border-top: none;
  border-right: none;
  .conttent4 {
    display: flex;
    align-items: center;
    width: calc(48% - 1px);
    height: 40px;
    line-height: 40px;
    border-right: $borderColor;
    background-color: #fff;
    text-align: left;
    cursor: pointer;
    white-space: nowrap; //溢出不换行
    &-title {
      color: $titleColor;
      padding-left: 12px;
    }
    &-txt {
      overflow: hidden; //超出的文本隐藏
      text-overflow: ellipsis; //溢出用省略号显示
      white-space: nowrap; //溢出不换行
    }
  }
  .conttent5 {
    display: flex;
    align-items: center;
    width: 52%;
    height: 40px;
    line-height: 40px;
    text-align: left;
    background-color: #fff;
    cursor: pointer;
    white-space: nowrap;
    &-title {
      padding-left: 12px;
      color: $titleColor;
    }
    &-txt {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  .conttent6 {
    width: calc(48% - 1px);
    min-height: 100px;
    text-align: left;
    // border-right: $borderColor;
    background: #fff;
    border-top: none;
    cursor: pointer;
    // white-space: nowrap;
    &-title {
      color: $titleColor;
      padding: 12px;
    }
    &-txt {
      padding: 0 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    // 评价
    &-score {
      padding: 12px;
      &-title {
        color: $titleColor;
      }
      &-affirm {
        padding: 12px;
        padding-left: 0;
        ::v-deep .el-col {
          padding-bottom: 12px;
        }
        ::v-deep .el-col:last-child {
          padding-bottom: 0;
        }
      }
    }
  }
  .conttent7 {
    width: calc(52% - 30px);
    min-height: 100px;
    text-align: left;
    background: #fff;
    border-left: $borderColor;
    
    cursor: pointer;
    &-title {
      color: $titleColor;
      padding: 12px;
    }
    &-txt {
      padding: 0 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }
    // 签名
    &-sign {
      display: flex;
      align-items: center;
      padding: 12px;
      &-title {
        color: $titleColor;
      }
    }
  }
  .content11 {
    width: 10%;
    height: 120px;
    line-height: 40px;
    text-align: center;
    background-color: #fafafa;
    border-left: $borderColor;
    
    border-bottom: $borderColor;
    color: $titleColor;
    font-size: 14px;
  }
}
</style>